package com.laoma.gateway.filter;

//@Configuration
//public class LogGlobalGatewayFilterConfig {
//    @Bean
//    @Order(-1)
//    public GlobalFilter logGlobalGatewayFilter()
//    {
//        return (exchange, chain) -> {
//            //调用请求之前统计时间
//            Long startTime = System.currentTimeMillis();
//            return chain.filter(exchange).then(Mono.fromRunnable(() -> {
//                //调用请求之后统计时间
//                Long endTime = System.currentTimeMillis();
//                System.out.println(
//                        exchange.getRequest().getURI().getRawPath() + ", cost time : " + (endTime - startTime) + "ms");
//            }));
//        };
//    }
//}
